﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace DTO
{
    [DataContract]
    [KnownType(typeof(Department))]
    [KnownType(typeof(AdmDepartment))]
    public class DepartmentBase: DTOChilds
    {
        [DataMember]
        public int? IDDepartment { get; set;}
        
        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public string Abbriviation { get; set; }

        [DataMember]
        public DepartmentBase Parent { get; set; }

        public override string ToString()
        {
            return this.Name;
        }
    }
}
